package com.vueapi.config;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;

import java.time.LocalDateTime;

/**
 * @Classname BlogMetaObjectHandler
 * @Description TODO
 * @Created by 赵宏建
 * @Date 2022/9/20 13:40
 * @Version 1.0.0
 */
public class BlogMetaObjectHandler implements MetaObjectHandler {
    @Override
    public void insertFill(MetaObject metaObject) {
        // 数据库配置了自动设置
    }

    @Override
    public void updateFill(MetaObject metaObject) {
        this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
    }
}
